package yannan.voiplock4ble.bean.ble;

/**
 * 说明：
 * 作者：mainTel
 * 时间：2016/12/5 15:33
 * 备注：
 */
public class AddPwd extends BaseBleResponse {

    /*
        //注册密码用户应答
        typedef struct {
            AppCommandHead_T head;
            uint8_t cmd;
            uint8_t reserve;	//对齐保留
            uint16_t token;
        //注册密码用户返回类型
        PWD_REGISTER_SUCCESS			0		//注册成功
	    PWD_VERIFY_AUTHORITY_OK			1		//密码注册验证管理员成功
    	PWD_VERIFY_AUTHORITY_FAILURE	2		//密码注册验证管理员失败
    	PWD_NUM_REACH_MAX				3		//密码达到了最大值
        PWD_SAME_HAVE_EXSITED			4		//密码在门锁内已经存在
    	PWD_ENTER_FIRST_SUCCESS			5		//第一次输入密码成功
    	PWD_ENTER_FIRST_ERROR			6		//第一次输入密码错误
    	PWD_ENTER_FIRST_TIMEOUT			7		//第一次密码输入超时
    	PWD_ENTER_SECOND_ERROR			8		//第二次密码输入错误
    	PWD_ENTER_SECOND_NOT_SAME		9		//第二次输入与第一次不一样
    	PWD_ENTER_SECOND_TIMEOUT		10		//第二次输入密码超时
            uint16_t operResult;		//注册密码用户返回类型
            uint16_t userId;			//新注册的密码用户ID
            uint32_t timeStamp;
        }PwdUserRegisterRsp_T;
     */

    public final static int PWD_REGISTER_SUCCESS = 0;
    public final static int PWD_VERIFY_AUTHORITY_OK = 1;
    public final static int PWD_VERIFY_AUTHORITY_FAILURE = 2;
    public final static int PWD_NUM_REACH_MAX = 3;
    public final static int PWD_SAME_HAVE_EXSITED = 4;
    public final static int PWD_ENTER_FIRST_SUCCESS = 5;
    public final static int PWD_ENTER_FIRST_ERROR = 6;
    public static final int PWD_ENTER_FIRST_TIMEOUT = 7;
    public final static int PWD_SET_ENTER_TIME_OUT = 5;
    public final static int PWD_ENTER_SECOND_ERROR = 8;
    public final static int PWD_ENTER_SECOND_NOT_SAME = 9;
    public static final int PWD_ENTER_SECOND_TIMEOUT = 10;

    public int operResult;
    public int userId;
    public int timeStamp;

    public AddPwd(byte[] response) {
        super(response);
        operResult = content[0] & 0xff;
        userId = content[2] & 0xff;
        //时间暂时不做
    }
}
